package club.emergency.wechat.department_staff.operate;

import club.emergency.wechat.model.staff.DepartmentStaff;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create with IntelliJ IDEA
 * Project Name: wechat
 * Package Name: club.emergency.wechat.department_staff.operate
 * Date: 2019/4/1
 *
 * @author: 快乐的小菌菌
 * Description:
 */
public interface DepartmentStaffOperate {

    /**
     * 新增企业人员
     *
     * @param departmentStaff 企业人员pojo
     * @return 以字符串类型返回
     */
    @PostMapping("/department-staff-operate-provider/saveDepartmentStaff")
    String saveDepartmentStaff(@RequestBody DepartmentStaff departmentStaff);

    /**
     * 修改企业人员信息
     *
     * @param departmentStaff 企业人员pojo
     * @return 以字符串形式返回
     */
    @PostMapping("/department-staff-operate-provider/modifyDepartmentStaff")
    String modifyDepartmentStaff(@RequestBody DepartmentStaff departmentStaff);

    /**
     * 从Excel中导入企业人员
     *
     * @param suffix         后缀名
     * @param bytes          输入流数组
     * @param departmentCode 部门匹配字段
     * @param departmentId   部门id
     * @return 以字符串形式返回
     */
    @PostMapping("/department-staff-operate-provider/saveDepartmentStaffFromExcel")
    String saveDepartmentStaffFromExcel(@RequestParam("suffix") String suffix, @RequestBody byte[] bytes, @RequestParam("departmentId") Long departmentId, @RequestParam("departmentCode") String departmentCode);
}
